package com.isoft.airportsystem.util;

/**
 * 系统常量定义
 */
public class Constants {

    // 权限常量
    public static class Permission {
        public static final String ADMIN = "system:admin";
        public static final String FLIGHT_MANAGE = "system:flight:manage";
    }

    // 航班状态映射
    public static class FlightStatus {
        public static String getDisplayName(String status) {
            return switch (status) {
                case "ON_TIME" -> "准点";
                case "DELAYED" -> "延误";
                case "CANCELED" -> "取消";
                case "DIVERTED" -> "备降";
                default -> status;
            };
        }
    }

    // 行李状态映射
    public static class BaggageStatus {
        public static String getDisplayName(String status) {
            return switch (status) {
                case "NORMAL" -> "正常";
                case "DELAYED" -> "延误";
                case "DAMAGED" -> "损坏";
                case "LOST" -> "丢失";
                default -> status;
            };
        }
    }

    // 用户状态映射
    public static class UserStatus {
        public static String getDisplayName(String status) {
            return switch (status) {
                case "ACTIVE" -> "正常";
                case "DISABLED" -> "禁用";
                case "LOCKED" -> "锁定";
                default -> status;
            };
        }
    }

    // 用户角色映射
    public static class UserRole {
        public static String getDisplayName(String role) {
            return switch (role) {
                case "ADMIN" -> "管理员";
                case "FLIGHT_MANAGER" -> "航班管理员";
                case "BAGGAGE_MANAGER" -> "行李管理员";
                case "USER" -> "普通用户";
                default -> role;
            };
        }
    }
}